package com.yunsom.testdemo.design.builder;

/**
 * @author Xbao
 * @version 1.0
 * @description 建造者模式
 * @date 2021/3/30 19:18
 */
public class BuilderTest {

  public static void main(String[] args) {
    HotPotBuilder hotPotBuilder = new HotPotBuilder();
    HotPot spicyHotPot = hotPotBuilder.prepareSpicyHotPot();
    System.out.println("spicyHotPot");
    spicyHotPot.showMaterials();
    System.out.println("total cost :"+spicyHotPot.getCost());

    HotPot thinSoupHotPot = hotPotBuilder.prepareThinSoupHotPot();
    System.out.println("thinSoupHotPot");
    thinSoupHotPot.showMaterials();
    System.out.println("total cost :"+thinSoupHotPot.getCost());
  }
}
